package duppentity.annotations;

import duppentity.convertors.Convertor;
import duppentity.convertors.DefaultConvertor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 *
 * @author zhangzc@djcars.cn
 * @create 2016/8/8
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Dupp {

    /**
     * dupp入口
     * @return
     */
    String value();

    /**
     * 结果转换器
     * @return
     */
    Class<? extends Convertor> convertor() default DefaultConvertor.class;

    /**
     * 如果Dupp接口返回值是单一原始类型(如Integer, Long, String)
     * @return
     */
    String primitiveField() default "result";
}
